<template name="usersUpdate">
    <div class="container">
        <!--Breadcrumbs-->
        <ol class="breadcrumb">
            <li><a href="{{pathFor 'sitesIndex'}}">{{_ "Home"}}</a></li>
            <li><a href="{{pathFor 'usersIndex'}}">{{_ "Users"}}</a></li>
            <li class="active">{{_ "Update"}}</li>
        </ol>

        <div id="basic-form">
            <div class="title">
                <h3 class="pull-left">{{_ "Update"}} {{_ "User"}}</h3>
            </div>
            <div class="clearfix"></div>

            {{#with model}} 
            <form id="users_form">        
                <div class="form-group">
                    <label for="email" class="control-label">{{_ "Email"}} *</label>
                    <input type="text" id="email" value="{{emails.[0].address}}" placeholder="Email" class="form-control" autofocus="true">
                    <span class="help-block"></span>
                </div>
                <div class="form-group">
                    <label for="mugenRoleGroupId" class="control-label">{{_ "Mugen Role Group"}}</label>
                    <select class="form-control" id="mugenRoleGroupId">
                        <option value="">*</option>
                        {{#each mugenRoleGroups}}
                        <option value="{{_id}}" {{isSelected ../profile.mugenRoleGroupId}}>{{name}}</option>
                        {{/each}}
                    </select>
                    <span class="help-block"></span>
                </div>
                <div class="form-group">
                    <label for="name" class="control-label">{{_ "Name"}}</label>
                    <input type="text" id="name" value="{{profile.name}}" placeholder="Name" class="form-control">
                    <span class="help-block"></span>
                </div>
                <button id="btnSave" type="submit" class="btn btn-success">{{_ "Submit"}}</button>                
                <a href="{{pathFor 'usersIndex'}}" class="btn btn-default">{{_ "Back"}}</a>                        
            </form>
            {{/with}}
            
        </div>           
    </div>
</template>
